package org.spring.batch.ch07;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MultiThreadItemWriter implements org.springframework.batch.item.ItemWriter<Object> {

	private final Logger logger = LoggerFactory.getLogger(getClass());

	@Override
	public void write(List<? extends Object> items) throws Exception {
		logger.info("=====>>MultiThreadItemWriter, thread: {}, Count={}", Thread.currentThread().getName(), items.size());
		/*for (Object obj : items) {
			logger.info("obj:{}", obj);
		}*/
		throw new RuntimeException("手动抛了个异常");
	}

}
